<form id="pagerForm" method="post" action="">
	<input type="hidden" name="pageNum" value="{$pageNum}" />
	<input type="hidden" name="numPerPage" value="{$numPerPage}" />
	<input type="hidden" name="orderField" value="{$orderField}" />
	<input type="hidden" name="orderDirection" value="{$orderDirection}" />
	<input type="hidden" name="keywords" value="{$keywords}" />
	<input type="hidden" name="sfield" value="{$sfield}" />
	<input type="hidden" name="platform" value="{$platform}" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="" method="post">
		<input type="hidden" name="m" value="{$module_name}" />
		<input type="hidden" name="a" value="{$action_name}" />
	<div class="searchBar">
		<ul class="searchContent">
			<li style="width:210px;">
				<label style="width:60px;">关键字：</label>
				<input type="text" name="keywords" value="{$keywords}" style="width:120px;"/>
			</li>
			<li style="width:80px;">
			<select name="sfield" class="combox">
				<option value="all" {if $sfield=='all'}selected="selected"{/if}>请选择</option>
				<option value="id" {if $sfield=='id'}selected="selected"{/if}>编号</option>
				<option value="title" {if $sfield=='title'}selected="selected"{/if}>标题</option>
				<option value="username" {if $sfield=='username'}selected="selected"{/if}>用户名</option>
				<option value="user_id" {if $sfield=='user_id'}selected="selected"{/if}>用户ID</option>
			</select>
			<input type="hidden" name="sfield_name" value="id,username,mobile" />
			</li>
			<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
		</ul>
	</div>
	</form>
</div>
<div class="pageContent">
	<div id="user_list">
	<table class="list" layoutH="63">
		<thead>
			<tr>
				<th width="5%" orderField="id" {if $orderField=='id'}class="{$orderDirection}"{/if}>编号</th>
				<th width="10%" orderField="title" {if $orderField=='title'}class="{$orderDirection}"{/if}>标题</th>	
				<th width="15%" orderField="info" {if $orderField=='info'}class="{$orderDirection}"{/if}>简介</th>													
				<th width="10%" orderField="name" {if $orderField=='name'}class="{$orderDirection}"{/if}>所属店铺</th>
				<th width="15%" orderField="address" {if $orderField=='address'}class="{$orderDirection}"{/if}>区域</th>
				<th width="15%" orderField="create_time" {if $orderField=='create_time'}class="{$orderDirection}"{/if}>创建时间</th>
				<th width="5%" orderField="status" {if $orderField=='status'}class="{$orderDirection}"{/if}>状态</th>
				<th width="15%" >操作</th>
			</tr>
		</thead>
		<tbody>
<volist name="list" id="vo">
			<tr target="sid_dv" rel="{$vo['id']}">
				<td>{$vo['id']}</td>
				<td>{$vo['title']}</td>
				<td>{$vo['info']}</td>
				<td>{$vo['name']}</td>
				<td>{$vo['address']}</td>
				<td>{$vo['create_time']}</td>
				<td><button onclick="ajax_status({$vo['id']},this)">{if $vo['status']=='1'}显示{else}隐藏{/if}</button></td>
				<td>
					<a title="查看" target="dialog"  rel="User_detail_{$vo['id']}" href="{:U('Site/article_add',array('mod'=>'ads','id'=>$vo['id']))}" class="btnInfo">查看</a>
					<a title="编辑" target="dialog"  rel="User_edit_{$vo['id']}" href="{:U('Site/article_add',array('mod'=>'ads','id'=>$vo['id'],'siteid'=>$vo['siteid'],'user_id'=>$vo['user_id']))}" class="btnEdit">编辑</a>
					<a title="添加" target="dialog"  rel="User_edit_{$vo['id']}" href="{:U('Site/article_add',array('mod'=>'ads','siteid'=>$vo['siteid'],'user_id'=>$vo['user_id']))}" class="btnEdit">添加</a>
				</td>
			</tr>
</volist>
				<script type="text/javascript">
				function ajax_status(id,obj){
					var str = $(obj).html();
					var status = (str=='显示') ? 2 : 1;
					$.ajax({
						type: 'GET',
						url: "{:U('Site/ajax_doen')}",
						data: 'mod=article&type=update&id='+id+'&status='+status,
						success: function(msg){
							if ( str == '隐藏' ) $(obj).html('显示');
							if ( str == '显示' ) $(obj).html('隐藏');
							
						}
					});
				}
				</script>
		</tbody>
	</table>
	</div>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20" {if $numPerPage==20}selected="selected"{/if}>20</option>
				<option value="50" {if $numPerPage==50}selected="selected"{/if}>50</option>
				<option value="66" {if $numPerPage==66}selected="selected"{/if}>66</option>
				<option value="100" {if $numPerPage==100}selected="selected"{/if}>100</option>
				<option value="200" {if $numPerPage==200}selected="selected"{/if}>200</option>
			</select>
			<span>条，共{$totalCount}条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$pageNum}"></div>
	</div>
</div>
